<div id="main_block">
<h1><?php echo $org->name; ?></h1>
<p><?php echo $org->description; ?></p>
<table class="data_table">
<?php if($org->users()) { ?>
<tr>
  <td style="font-weight:bold;">Represented by: </td>
  <td>
      <?php 
      foreach($org->users() as $role) 
              {
                echo '<div><a href="'. site_url('profile/'.$role->user->iduser ).'">';
                echo $role->user->name . '</a>';
                echo ' as ' . $role->role;
                echo '</div>';
               }
       ?>
  </td>
</tr>
<?php } ?>
<?php if(count($org->articles())>0) {?>
<tr>
  <td style="font-weight:bold;">Articles about <?php echo $org->name; ?>: </td>
  <td></td>
</tr>
</table>
<?php foreach($org->articles() as $article):?>
<?php echo $article->info();?>
<?php endforeach; } else {?>
<tr>
  <td style="font-weight:bold;">There are no articles about this organization.</td>
  <td></td>
</tr>
</table>
<?php } ?>


</div>